package cn.kgm.filterVip;

import java.util.List;

public class AndIdentityFilter {

    private static boolean isTrue = true;

    public static IdentityFilter doAndIdentityFilter(List<IdentityFilter> identitys, Person person) {
        CalcEdFilter calcEdFilter = new CalcEdFilter();
        identitys.forEach(identityFilter -> {
            isTrue = (isTrue && identityFilter.meetIdentityFilter(person));
        });
        calcEdFilter.meetIdentityFilter(isTrue);
        return calcEdFilter;
    }
}
